package ooday05;

public class EnumDemo {
    public static void main(String[] args) {
        Season s = Season.AUTUM;
        System.out.println(s.getSeasonName()+","+s.getSeasonDesc());
        switch (s){
            case SPRING:
                System.out.println("天气"+s.getSeasonDesc()+"去放风筝");
                break;
            case SUMMER:
                System.out.println("天气"+s.getSeasonDesc()+"去游泳");
                break;

            case AUTUM:
                System.out.println("天气"+s.getSeasonDesc()+"去钓鱼");
                break;

            case WINTER:
                System.out.println("天气"+s.getSeasonDesc()+"在家");



        }
        Season[] seasons = Season.values();
        for (int i =0;i<seasons.length;i++){

            System.out.println(seasons[i]);

            System.out.println(seasons[i].getSeasonName());

            System.out.println(seasons[i].getSeasonDesc());


        }


    }
}
